import { lazy } from 'react'
import {CopyOutlined} from "@ant-design/icons";
import { IMenuRoutes } from '../element.tsx'

const File = lazy(() => import('@/views/File'))
const FileList = lazy(() => import('@/views/File/FileList'))
const Preview = lazy(() => import('@/views/File/preview/index.tsx'))
const ExcelPreview = lazy(() => import('@/views/File/ExcelPreview/index.tsx'))

const file: IMenuRoutes = {
    path: 'file',
    element: <File />,
    key: '/file',
    label: '文件管理',
    icon: <CopyOutlined />,
    title: '文件管理',
    children: [
        {
            path: 'list',
            element: <FileList />,
            key: '/file/list',
            title: '上传文件',
            label: '上传文件'
        },
        {
            path: 'word',
            element: <Preview />,
            key: '/file/word',
            title: 'word预览',
            label: 'word预览'
        },
        {
            path: 'excel',
            element: <ExcelPreview />,
            key: '/file/excel',
            title: 'excel预览',
            label: 'excel预览'
        }
    ]
}

export default file